package com.zzyl.vo;

import com.zzyl.base.BaseVo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;

@Data
@ApiModel(description = "护理项目实体类")
public class NursingProjectVo extends BaseVo {

    @ApiModelProperty(value = "编号")
    private Long id;

    @ApiModelProperty(value = "名称")
    private String name;

    @ApiModelProperty(value = "格式化后的价格")
    private String formattedPrice;

    @ApiModelProperty(value = "图片URL")
    private String imageUrl;

    @ApiModelProperty(value = "护理要求")
    private String nursingRequirement;

    @ApiModelProperty(value = "状态文本（启用/禁用）")
    private String statusText;

    // 构造函数、Getters、Setters 和其他业务逻辑

    public void setFormattedPrice(BigDecimal price) {
        this.formattedPrice = "¥" + price.setScale(2, BigDecimal.ROUND_HALF_UP).toString();
    }

    public void setStatusText(Integer status) {
        this.statusText = status == 1 ? "启用" : "禁用";
    }
}
